Method of and device for detecting cable connection

ABSTRACT

The detector includes the plug for connecting the personal computer through a cable, battery power supply which provides a constant power supply, and the MCU which receives a specific potential from the personal computer when the later is connected.

FIELD OF THE INVENTION

[0001] The present invention relates to a method of and device fordetecting wire connection between a personal computer and a peripheraldevice by the use of the technology of Universal Serial Bus (“USB”).

BACKGROUND OF THE INVENTION

[0002]FIG. 6 is a block diagram showing a connection between thepersonal computer 1007 and the conventional detector 1001. The personalcomputer 1007 comprises the route hub 1005 and the plug 1004. The routehub 1005 is a host for communication using the USB. The route hub 1005and the plug 1004 are connected through the power line VBUS and theresistance R2. Electric potential VBUS is supplied to the peripheraldevice from the personal computer through a power line.

[0003] The detector 1001 comprises the level conversion and protectioncircuit 1002, MCU 1003, plug 1009, and the resistance R1. The MCU 1003and the plug 1009 are connected through the USB communication linetransmitting electrical potential for a differential signal of a D+voltage level, and the USB communication line transmitting electricalpotential for a differential signal of a D− voltage level. Theresistance R1 is connected between the MPU 1003 and the USBcommunication line transmitting D− electrical potential. The resistanceR1 transmits an output VREG of a regulator built in the MCU 1003. Theplug 1004 of the personal computer 1007 and the plug 1009 of thedetector 1001 are connected through the cable 1006.

[0004] Potential VBUS from the personal computer 1007 is applied to thelevel conversion and protection circuit 1002 through the plugs 1004 and1009. When the potential VBUS is received, the level conversion andprotection circuit 1002 outputs the VBUS detection signal to the MCU1003.

[0005] In the conventional detector 1001 the level conversion andprotection circuit 1002 is provided outside the MCU 1003. Thus,reception of potential VBUS is detected in this level conversion andprotection circuit 1002 that is an external circuit with respect to theMPU 1003. The MCU 1003 detects connection of the detector 1001 and thepersonal computer 1007 based on the VBUS detection signal output by thelevel conversion and protection circuit 1002. Thus, in the conventionaldetector 1001 the level conversion and protection circuit 1002 isrequired and therefore it is difficult to reduce the size of thecircuit.

[0006] Some times the detector is provided with a built in battery powersupply and this battery is charged using the potential received from thepersonal computer. However, in such a detector it is difficult toperform fine detection of the connection, therefore, more circuitry isrequired to be provided. Therefore, there is a problem that it isdifficult to reduce the size of the circuit.

SUMMARY OF THE INVENTION

[0007] It is an object of this invention to provide an intelligent andsmall-sized detector that consumes less power.

[0008] The detector according to one aspect of this invention comprisesa plug for connecting the detector to the personal computer through acable; a battery power supply which outputs a predetermined constantelectrical potential; and a Micro Control Unit which receives a specificelectrical potential from the personal computer through the plug andcable, and receives the constant electrical potential from the batterypower supply.

[0009] The detector according to another aspect of this inventioncomprises a plug for connecting the detector to the personal computerthrough a cable; a battery power supply which outputs a predeterminedconstant electrical potential; an oscillator which outputs anoscillation signal; and a Micro Control Unit which receives a specificelectrical potential from the personal computer through the plug andcable, receives the constant electrical potential from the battery powersupply, and receives the oscillation signal from the oscillator.

[0010] Other objects and features of this invention will become apparentfrom the following description with reference to the accompanyingdrawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0011]FIG. 1 is a block diagram of a detector according to a firstembodiment;

[0012]FIG. 2 is a block diagram of a detector according to a secondembodiment;

[0013]FIG. 3 is a block diagram of a detector according to a thirdembodiment;

[0014]FIG. 4 is a block diagram of a detector according to a fourthembodiment;

[0015]FIG. 5 is a block diagram of a detector according to a fifthembodiment; and

[0016]FIG. 6 is a block diagram showing a connection between a personalcomputer and a conventional detector.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0017] Embodiments of a detector according to the present invention willbe explained below with reference to the accompanying drawings.

[0018]FIG. 1 is a block diagram of the detector 1 according to a firstembodiment of the present invention. The detector 1 comprises the MCU 3,the battery power supply 7, and the plug 9. The battery power supply 7supplies a predetermined constant electrical potential to the MCU 3. Theplug 9 supplies a specific electrical potential to the MCU 3.

[0019] The MCU 3 comprises the USB function circuit 5, the CPU andperipheral circuit 6, and the detection circuit 8. Moreover, the MCU 3comprises a VCC terminal for input of a VCC level signal from thebattery power supply 7, VSS terminal which is connected to the plug 9for transmission of a standard level VSS (usually, earth electricalpotential, and hereinafter, called as VSS), D+ terminal which isconnected to the plug 9 for transmission of a D+ electric level, and aD− terminal which is connected to the plug 9 for transmission of aD−electric level.

[0020] The MCU 3 comprises a VREG terminal for transmission of outputVREG of a regulator built in the USB function circuit 5, and a VBUSterminal which is connected to the plug 9 for transmission of VBUS(electrical potential supplied form the personal computer).

[0021] The USB function circuit 5 is connected to the VCC terminal, VSSterminal, D+ terminal, D− terminal, VREG terminal, and the VBUSterminal. The CPU and peripheral circuit 6 is connected to the VCC andVSS terminals. The peripheral circuit 6 performs on-off control of theUSB function circuit 5 based on the output of the detection circuit 8.The detection circuit 8 is connected to the VBUS terminal, and the CPUand peripheral circuit 6. The resistance R1 whose one terminal isconnected to the VREG terminal, and the other terminal is connected to aUSB communication line for transmission of the D− electrical potentialis provided. The D− electrical potential is pulled up by the resistanceR1 at the VREG electrical potential in the case of low rate USBcommunication.

[0022] Although not shown here, the detector 1 is connected to apersonal computer through the plug 9, cable, and a plug in the personalcomputer is the same manner as explained with reference to theconventional detector.

[0023] The D− electrical potential is pulled up to VREGX (R2/(R1+R2)) Vand the D+ electrical potential is pulled down by the resistance R2, asthere is no output by the resistance R1 and the resistance R2 of thepersonal computer together with the MCU 3 and the route hub of thepersonal computer in the case of no communication.

[0024] Operations of the detector 1 will be described below. When thecable for connecting the detector 1 and the personal computer isconnected to the plug 9, potential VBUS which is received from thepersonal computer is applied to the USB function circuit 5 and thedetection circuit 8.

[0025] The detection circuit 8 supplies the potential VBUS to the CPUand peripheral circuit 6. The detection circuit 8 monitors the voltagelevel of VBUS supplied through the cable. The CPU and peripheral circuit6 outputs an Enable signal for ON operation of the USB function circuit5 so as to perform USB communication.

[0026] The USB function circuit 5 after the ON operation outputs theVREG electrical potential of the output of the built-in regulator. TheVREG electrical potential is applied to the D− terminal while the D−electrical potential of the USB communication line is pulled up by theresistance R1.

[0027] The detection circuit 8 outputs a signal having a low logicallevel (“L”) when the potential VBUS is Hi-Z and outputs a signal havinghigh logical level (“H”) when the potential VBUS is the specificelectrical potential (for example, 5 V) to the CPU and peripheralcircuit 6. In other words, the detection circuit 8 shall output a “L”signal when the detector and the personal computer are not connected toeach other, because, in this case the potential VBUS will be equal toHi-Z. On the other hand, the detection circuit 8 shall output a “H”signal when the detector and the personal computer are connected to eachother, because, in this case the potential VBUS will be equal to thespecific electrical potential.

[0028] Thus, whether the detector and the personal computer areconnected to each other can be detected by the CPU and peripheralcircuit 6 based on the changes in the voltage level of VBUS suppliedfrom the detection circuit 8. Accordingly, the MCU 3 functions as acommunication controller using the USB between the detector 1 and thepersonal computer.

[0029] According to the first embodiment, more intelligent connectiondetection using the MCU, compared with that of a conventional detector,may be realized by provision of the MCU provided with the detectioncircuit.

[0030] Moreover, the MCU has an advantage that the MCU eliminate aspecial circuit, which has been conventionally required for detection,as the MCU may have a control function as a peripheral device (notshown).

[0031] When the detector 1 and the personal computer are not connectedto each other, the peripheral device is activated based on the built inbattery power supply. In this case, the potential VBUS is not input intothe USB function circuit. The USB function circuit may be made to stopits operation when the potential VBUS is not received, which shall leadto reduced power consumption. The USB function circuit may be made torestart its operation when the detector and the personal computer areonce more connected to each other. Moreover, the MPU 3 may be made tocharge the battery power supply using the potential VBUS.

[0032]FIG. 2 is a block diagram of a detector 11 according to a secondembodiment of the present invention. The detector 11 comprises MCU 13,battery power supply 17 for supplying of predetermined electricalpotential to the MCU 13, and the plug 19 transmitting specificelectrical potential to the MCU 13.

[0033] The MCU 13 comprises the USB function circuit 15, CPU andperipheral circuit 16, and the detection circuit 18. Moreover, the MCU13 comprises a VCC terminal for input of a VCC level signal from thebattery power supply 17, VSS terminal which is connected to the plug 19for transmission of a standard level VSS, D+ terminal which is connectedto the plug 19 for transmission of a D+ electric level; and a D−terminal which is connected to the plug 9 for transmission of aD−electric level. The MCU 3 also includes a VREG terminal fortransmission of an output VREG of a regulator built in the USB functioncircuit 15 and a VBUS terminal which is connected to the plug 9 fortransmission of VBUS (electrical potential supplied from the personalcomputer).

[0034] The USB function circuit 15 is connected to the VCC terminal, VSSterminal, D+ terminal, D− terminal, VREG terminal, and the VBUSterminal. The A-D converter 18 is connected to the VCC terminal, VSSterminal, and the D−terminal. The A-D converter 18 performs conversionof the D− electrical potential to a digital value for transmission tothe CPU and peripheral circuit 16. The CPU and peripheral circuit 16 isconnected to the VCC and VSS terminals. The CPU and peripheral circuit16 performs on-off control of the USB function circuit 15 based on theoutput of the A-D converter 18. The resistance R1 whose one terminal isconnected to the VREG terminal, and the other terminal to a USBcommunication line for transmission of the D− electrical potential isprovided. The D− electrical potential is pulled up at the VREGelectrical potential in the case of low rate USB communication.

[0035] Although not shown here, the detector 11 is connected to apersonal computer through the plug 19, cable, and a plug in the personalcomputer is the same manner as explained with reference to theconventional detector.

[0036] Moreover, the D− electrical potential is pulled up to VREGX(R2/(R1+R2)) V and the D+ electrical potential is pulled down by theresistance R2, as there is no output by the resistance R1 and theresistance R2 of the personal computer together with the MCU 13 and theroute hub of the personal computer in the case of no communication.

[0037] The detector 11 operates as follows. The D−electrical potentialof the USB communication line is divided by the resistance R1 and theresistance R2 provided in the personal computer, in a state the cable isconnected to the plug 19 and there is no communication.

[0038] The divided electrical potential is input to the A-D converter 18as an A-D input. The A-D converter 18 outputs the VBUS detection signalto the CPU and peripheral circuit 16.

[0039] The CPU and peripheral circuit 16 outputs the Enable signal tothe USB function circuit 15 to perform on-off operation of the USBfunction circuit 15, and the USB function circuit 15 outputs the outputVREG of the built-in regulator.

[0040] The VREG electrical potential is transmitted to the D− terminalwhile the D− electrical potential of the USB communication line ispulled up by the resistance R1.

[0041] When the detector 11 and the personal computer are not connectedto each other, the D− electrical potential becomes equal to the outputVREG of the regulator. Accordingly, whether the detector and thepersonal computer are connected to each other can be detected based onthe detection of the difference in the D− electrical potential betweenthe connection state of the cable and the non-connection state of thecable. That is, the difference in the digital values caused by theconnection/non-connection states of the cable may be used as detectionunit.

[0042] According to the second embodiment, the similar advantages tothose of the first embodiment may be expected by provision of the MCUcomprising the A-D converter, and, if the A-D converter is essentiallyrequired as a function of a personal computer peripheral device, commonuse of the converter may be advantageously realized.

[0043]FIG. 3 is a block diagram of a detector 31 according to a thirdembodiment of the present invention. The detector 31 comprises the MCU33, battery power supply 37 for supplying of predetermined electricalpotential to the MCU 33, and the plug 39 transmitting specificelectrical potential to the MCU 33.

[0044] The MCU 33 comprises the USB function circuit 35, CPU andperipheral circuit 36, and the ring oscillator 38. Furthermore, the MCU33 comprises a VCC terminal for input of a VCC level signal from thebattery power supply 37, VSS terminal which is connected to the plug 19for transmission of a standard level VSS, D+ terminal which is connectedto the plug 39 for transmission of a D+ electric level, and a D−terminal which is connected to the plug 39 for transmission of aD−electric level. The MCU 3 also includes a VREG terminal fortransmission of output VREG of a regulator built in the USB functioncircuit 35, and a VBUS terminal which is connected to the plug 39 fortransmission of VBUS (electrical potential supplied from the personalcomputer).

[0045] The USB function circuit 35 is connected to the VSS terminal, VSSterminal, D+ terminal, D− terminal, VREG terminal, and the VBUSterminal. The CPU and peripheral circuit 36 is connected to the VCC andVSS terminals. The CPU and peripheral circuit 36 performs on-off controlof the USB function circuit 35 based on the output of the ringoscillator 38. The ring oscillator 38 is connected to the VCC and VSSterminals.

[0046] The resistance R1 whose one terminal is connected to the VREGterminal and the other terminal is connected to a USB communication linefor transmission of the D− electrical potential is provided. Theresistance R1 pulls up the D− electrical potential at the VREGelectrical potential in the case of low rate USB communication.

[0047] Although not shown here, the detector 31 is connected to apersonal computer through the plug 39, cable, and a plug in the personalcomputer is the same manner as explained with reference to theconventional detector.

[0048] Moreover, the D− electrical potential is pulled up to VREGX(R2/(R1+R2)) V and the D+ electrical potential is pulled down by theresistance R2, as there is no output by the resistance R1 and theresistance R2 of the personal computer together with the MCU 33 and theroute hub of the personal computer in the case of no communication.

[0049] The detector 31 operates as follows. Potential VBUS functions asa power supply of the ring oscillator 38 for oscillation in a statewhere the cable is connected to the plug 39. The ring oscillator 38outputs the VBUS detection signal to the CPU and peripheral circuit 36.The CPU and peripheral circuit 36 outputs the Enable signal to the USBfunction circuit 35, and the USB function circuit 35 outputs the outputVREG of the built-in regulator.

[0050] When the detector 31 and the personal computer are not connectedto each other, the ring oscillator 38 does not oscillate. Accordingly,whether the detector 31 and the personal computer are connected to eachother can be detected based on monitoring of the difference in theoscillation output of the ring oscillator 38 between under a connectionstate and under a non-connection state of the cable.

[0051] According to the third embodiment, the similar advantages tothose of the first embodiment may be expected by provision of the MCUcomprising the ring oscillator.

[0052]FIG. 4 is a block diagram of a detector 51 according to a fourthembodiment of the present invention. The detector 51 comprises the MCU53, battery power supply 57 for supplying of predetermined electricalpotential to the MCU 53, plug 59 transmitting specific electricalpotential to the MCU 53, and the oscillator (for example, ceramic orcrystal-oscillation circuit, and, hereinafter, called as an oscillator)61 for input/output of an oscillation signal to/from the MCU 53.

[0053] The MCU 53 comprises the USB function circuit 55, CPU andperipheral circuit 56, oscillation circuit 58, and the counter 60 forcounting of the oscillation output from the oscillation circuit 58.Furthermore, the MCU 53 comprises a VCC terminal for input of a VCClevel signal from the battery power supply 57, D+ terminal which isconnected to the plug 59 for transmission of a D+ electric level, and aD− terminal which is connected to the plug 59 for transmission of aD−electric level. The MCU 53 also comprises a VREG terminal fortransmission of an output VREG of a regulator built in the USB functioncircuit 55, and a VBUS terminal which is connected to the plug 59 fortransmission of VBUS (electrical potential supplied from the personalcomputer). In addition, the MCU 53 comprises a XIN terminal, and a XOUTterminal for transmission of an oscillation signal which is input to theoscillation circuit 58 from the oscillator 61 and vice versa.

[0054] The USB function circuit 55 is connected to the D+ terminal, D−terminal, VREG terminal, and the VBUS terminal. The oscillation circuit58 is connected to the VBUS terminal, XIN terminal, and the XOUTterminal. The oscillation circuit 58 performs transmission of theoscillation output to the counter 60. The CPU and peripheral circuit 56is connected to the VCC terminal. The CPU and peripheral circuit 56performs on-off control of the USB function circuit 55 based on theoutput of the counter 60.

[0055] The resistance R1 whose one terminal is connected to the VREGterminal, and the other terminal is connected to a USB communicationline for transmission of the D− electrical potential is provided. Theresistance R1 pulls up the D− electrical potential at the VREGelectrical potential in the case of low rate USB communication.

[0056] Although not shown here, the detector 51 is connected to apersonal computer through the plug 59, cable, and a plug in the personalcomputer is the same manner as explained with reference to theconventional detector.

[0057] Moreover, the D− electrical potential is pulled up to VREGX(R2/(R1+R2)) V and the D+ electrical potential is pulled down by theresistance R2, as there is no output by the resistance R1 and theresistance R2 of the personal computer together with the MCU 53 and theroute hub of the personal computer in the case of no communication.

[0058] The detector 51 operates as follows. Potential VBUS is suppliedto the oscillation circuit 58 for oscillation in a state where the cableis connected to the plug 59. Oscillation output from the oscillationcircuit 58 is input to the counter 60 which outputs a detection signalto the CPU and peripheral circuit 56 after a predetermined number ofcounts. That is, the CPU and peripheral circuit 56 may detect theconnection state of the cable by overflow of the counter 60. The CPU andperipheral circuit 56 outputs the Enable signal to the USB functioncircuit 55, and the USB function circuit 55 outputs the output VREG ofthe built-in regulator.

[0059] When the detector 51 and the personal computer are not connectedto each other, the oscillation circuit 58 does not oscillate.Accordingly, whether the detector 51 and the personal computer areconnected to each other can be detected by confirmation, with the CPUand peripheral circuit 56, of a counting state where oscillation outputfrom the oscillation circuit 58 under the connection state of the cableis counted by a counter 60.

[0060] According to the fourth embodiment, the similar advantages tothose of the first embodiment may be expected by provision of an MCUcomprising the oscillation circuit for transmission of an input/outputfrom/to the oscillator; and a counter for input from the oscillationoutput from an oscillation circuit.

[0061]FIG. 5 is a block diagram of a detector 51 according to a fifthembodiment of the present invention. The detector 71 comprises MCU 73,battery power supply 77 for supplying of predetermined electricalpotential to the MCU 73, plug 59 transmitting specific electricalpotential to the MCU 53, plug 79 for transmission of specific electricalpotential to the MCU 73, and the oscillator 81.

[0062] The MCU 73 comprises the USB function circuit 75, CPU andperipheral circuit 76, oscillation circuit 78, counter 80 for countingof the oscillation output from the oscillation circuit 78, and the PLLcircuit 82 for generation of a clock for operations of the USB functioncircuit 75 by frequency multiplication of the oscillation output fromthe oscillation circuit 78. Furthermore, the MCU 73 comprises a VCCterminal for input of a VCC level signal from the battery power supply77, D+ terminal which is connected to the plug 79 for transmission of aD+ electric level, and a D− terminal which is connected to the plug 79for transmission of a D−electric level. The MCU 73 also comprises a VREGterminal for transmission of the output VREG of a regulator built in theUSB function circuit 75, and a VBUS terminal which is connected to theplug 79 for transmission of VBUS (electrical potential supplied from thepersonal computer). In addition, the MCU 73 comprises a XIN terminal,and a XOUT terminal for transmission of an input/output signal which isinput to the oscillation circuit 78 from the oscillator 81 and viceversa.

[0063] The oscillation circuit 78 is connected to the VBUS terminal, XINterminal and the XOUT terminal. The oscillation circuit 78 performstransmission of the oscillation output to the counter 80 and the PLLcircuit 82. The USB function circuit 75 is connected to the D+ terminal,D− terminal, VREG terminal, and the VBUS terminal. The PLL circuit 82supplies a clock to the USB function circuit 75.

[0064] The CPU and peripheral circuit 76 is connected to the VCCterminal. The CPU and peripheral circuit 76 performs on-off control ofthe USB function circuit 75 based on the output of the counter 80.

[0065] The resistance R1 whose one terminal is connected to the VREGterminal and the other terminal is connected to a USB communication linefor transmission of the D−electrical potential is provided. Theresistance R1 pulls up the D− electrical potential at the VREGelectrical potential.

[0066] Although not shown here, the detector 71 is connected to apersonal computer through the plug 79, cable, and a plug in the personalcomputer is the same manner as explained with reference to theconventional detector.

[0067] Moreover, the D− electrical potential is pulled up to VREGX(R2/(R1+R2)) V and the D+ electrical potential is pulled down by theresistance R2, as there is no output by the resistance R1 and theresistance R2 of the personal computer together with the MCU 73 and theroute hub of the personal computer in the case of no communication.

[0068] The detector 71 operates as follows. Potential VBUS is suppliedto the oscillation circuit 78 for oscillation in a state where the cableis connected to the plug 79. Oscillation output from the oscillationcircuit 78 is input to the counter 80 which outputs a detection signalto the CPU and peripheral circuit 76 after a predetermined number ofcounts. The PLL circuit 82 that outputs a clock for operations to theUSB function circuit 75 by input and frequency multiplication of theoscillation output from the oscillation circuit 78. The CPU andperipheral circuit 76 outputs the Enable signal to the USB functioncircuit 75, and the USB function circuit 75 outputs the output VREG ofthe built-in regulator.

[0069] When the detector 71 and the personal computer are not connectedto each other, the oscillation circuit 78 does not oscillate.Accordingly, whether the detector 71 and the personal computer areconnected to each other can be detected by confirmation, with the CPUand peripheral circuit 76, of a counting state where oscillation outputfrom the oscillation circuit 78 under the connection state of the cableis counted by a counter 80.

[0070] According to the fifth embodiment, more intelligent connectiondetection, compared with that of the fourth embodiment, may be realizedby provision of the MCU provided with the oscillation circuit fortransmission of the input/output form the oscillator; the counter forinput of the oscillation output from the oscillation circuit; and thePLL circuit for generation of a clock for operations of the USB functioncircuit by frequency multiplication of the oscillation output from theoscillation circuit.

[0071] Moreover, when a clock for operations of the USB function circuitis commonly used as the oscillation output from the oscillation circuit,a specially dedicated oscillation circuit may be eliminated, as only acounter is required for a circuit functioning only as detection unit.

[0072] In addition, there is also an advantage that the clock foroperations of the USB function circuit is commonly used as theoscillation circuit for detection of whether the detector 71 and thepersonal computer are connected to each other.

[0073] According to a sixth embodiment of the present invention, thedetector comprises a MCU that includes a comparator instead of the A-Dconverter shown in FIG. 2. Other configuration is the same as that shownin FIG. 2. However, the threshold for the comparator is assumed to becontrolled enough to detect the difference of the D−electrical potentialbetween a connection state and a non-connection state of the cable.

[0074] Whether the detector according to the sixth embodiment and thepersonal computer are connected to each other can be detected bydetection, with the inverter, of the difference in the D− electricalpotential between the connection state and the non-connection state ofthe cable.

[0075] Thus, according to the sixth embodiment, more intelligentconnection detection, than that of the second embodiment, may berealized by provision of the MCU comprising the comparator. Thecomparator has a simpler configuration as compared to the A-D converter,therefore, cost reduction becomes possible, and circuit becomes simple.

[0076] According to a sixth embodiment of the present invention, thedetector comprises a MCU that includes an inverter instead of the A-Dconverter shown in FIG. 2. Other configuration is the same as that shownin FIG. 2. However, the threshold for the inverter is assumed to bedesigned enough to detect the difference of the D− electrical potentialbetween a connection state and a non-connection state of the cable.

[0077] Whether the detector according to the seventh embodiment and thepersonal computer are connected to each other can be detected bydetection, with the inverter, of the difference in the D− electricalpotential between the connection state and the non-connection state ofthe cable.

[0078] According to the seventh embodiment, more intelligent connectiondetection, than that of the second embodiment, may be realized byprovision of the MCU comprising the inverter.

[0079] Moreover, the detection function may be realized by using aninverter with appropriately adjusted threshold (enough to detect thechanges in the D− electrical potential), that is, by a simplerconfiguration than that of a comparator according to the sixthembodiment.

[0080] As explained above, according to the detector of one aspect ofthis invention, intelligent and small-sized detector with low powerconsumption is obtained. Furthermore, a dedicated circuit for detectionthat is used conventionally is not required.

[0081] Also, the MCU is provided with the control function as aperipheral device. The peripheral device is activated using built-inbattery and the operation of the USB function circuit is stopped whenthe detector and the personal computer are not connected, therebyachieving reduction in the power consumption. Furthermore, when thedetector and the personal computer are connected, the operation of theUSB function circuit is restarted, and the battery is charged by thepotential from the personal computer.

[0082] Furthermore, a A-D converter is provided which may be commonlyused if the peripheral device requires A-D conversion. The A-D convertermay be replaced with a comparator. The comparator has a simplerconfiguration as compared to the A-D converter. Furthermore, the A-Dconverter may be replaced with an inverter. The inverter has a simplerconfiguration as compared to the A-D converter.

[0083] According to the method of another aspect of this invention, finedetection of the connection with low power consumption may beefficiently performed.

[0084] Although the invention has been described with respect to aspecific embodiment for a complete and clear disclosure, the appendedclaims are not to be thus limited but are to be construed as embodyingall modifications and alternative constructions that may occur to oneskilled in the art which fairly fall within the basic teaching hereinset forth.

What is claimed is:
 1. A detector for detecting a wire connection with apersonal computer, the detector comprising: a plug for connecting thedetector to the personal computer through a cable; a battery powersupply which outputs a predetermined constant electrical potential; anda Micro Control Unit which receives a specific electrical potential fromthe personal computer through the plug and cable, and receives theconstant electrical potential from the battery power supply.
 2. Thedetector according to claim 1, wherein the Micro Control Unit comprises:a CPU and peripheral circuit which receives the specific electricalpotential from the personal computer and the constant electricalpotential from the battery power supply; a USB function circuit whichreceives the specific electrical potential from the personal computer,wherein the USB function circuit is on-off controlled by the CPU andperipheral circuit; and a detection circuit which detects a voltagelevel of the specific electrical potential from the personal computerand outputs an electrical potential to the CPU and peripheral circuitbased on the detected voltage level.
 3. The detector according to claim1, wherein the Micro Control Unit comprises: a CPU and peripheralcircuit which receives the specific electrical potential from thepersonal computer and the constant electrical potential from the batterypower supply; a USB function circuit which receives the specificelectrical potential from the personal computer, wherein the USBfunction circuit is on-off controlled by the CPU and peripheral circuit;and an A-D converter which receives the specific electrical potentialfrom the personal computer and the constant electrical potential fromthe battery power supply, receives a differential signal, and outputs anelectrical potential to the CPU and peripheral circuit based thereceived electrical potentials and the differential signal.
 4. Thedetector according to claim 1, wherein the Micro Control Unit comprises:a CPU and peripheral circuit which receives the specific electricalpotential from the personal computer and the constant electricalpotential from the battery power supply; a USB function circuit whichreceives the specific electrical potential from the personal computer,wherein the USB function circuit is on-off controlled by the CPU andperipheral circuit; and a ring oscillator which receives the specificelectrical potential from the personal computer and the constantelectrical potential from the battery power supply, and outputs anelectrical potential to the CPU and peripheral circuit based thereceived electrical potentials.
 5. The detector according to claim 1,wherein the Micro Control Unit comprises: a CPU and peripheral circuitwhich receives the specific electrical potential from the personalcomputer and the constant electrical potential from the battery powersupply; a USB function circuit which receives the specific electricalpotential from the personal computer, wherein the USB function circuitis on-off controlled by the CPU and peripheral circuit; and a comparatorwhich receives the specific electrical potential from the personalcomputer and the constant electrical potential from the battery powersupply, receives a differential signal, and outputs an electricalpotential to the CPU and peripheral circuit based the receivedelectrical potentials and the differential signal.
 6. The detectoraccording to claim 1, wherein the Micro Control Unit comprises: a CPUand peripheral circuit which receives the specific electrical potentialfrom the personal computer and the constant electrical potential fromthe battery power supply; a USB function circuit which receives thespecific electrical potential from the personal computer, wherein theUSB function circuit is on-off controlled by the CPU and peripheralcircuit; and an inverter which receives the specific electricalpotential from the personal computer and the constant electricalpotential from the battery power supply, receives a differential signal,and outputs an electrical potential to the CPU and peripheral circuitbased the received electrical potentials and the differential signal. 7.A detector for detecting a wire connection with a personal computer, thedetector comprising: a plug for connecting the detector to the personalcomputer through a cable; a battery power supply which outputs apredetermined constant electrical potential; an oscillator which outputsan oscillation signal; and a Micro Control Unit which receives aspecific electrical potential from the personal computer through theplug and cable, receives the constant electrical potential from thebattery power supply, and receives the oscillation signal from theoscillator.
 8. The detector according to claim 7, wherein the MicroControl Unit comprises: a CPU and peripheral circuit which receives thespecific electrical potential from the personal computer and theconstant electrical potential from the battery power supply; anoscillation circuit which detects a voltage level of the specificelectrical potential from the personal computer, receives theoscillation signal from the oscillator, and outputs an oscillationoutput based on the detected voltage level and the oscillation signal;and a counter which counts the oscillation output from the oscillationcircuit and outputs a detection signal to the CPU and peripheralcircuit.
 9. The detector according to claim 8, wherein the Micro ControlUnit comprises: a PLL circuit which receives the oscillation output fromthe oscillation circuit and outputs a clock to the USB function circuit.10. A method of detecting a wire connection with a personal computerusing a detector, the detector including, a plug for connecting thedetector to the personal computer through a cable; a battery powersupply which outputs a predetermined constant electrical potential; anda Micro Control Unit which receives a specific electrical potential fromthe personal computer through the plug and cable, and receives theconstant electrical potential from the battery power supply, the MicroControl Unit including, a CPU and peripheral circuit which receives thespecific electrical potential from the personal computer and theconstant electrical potential from the battery power supply; a USBfunction circuit which receives the specific electrical potential fromthe personal computer, wherein the USB function circuit is on-offcontrolled by the CPU and peripheral circuit; and a detection circuitwhich detects a voltage level of the specific electrical potential fromthe personal computer and outputs an electrical potential to the CPU andperipheral circuit based on the detected voltage level, the methodcomprising the step of detecting, by the CPU and peripheral circuit,connection with the personal computer based on changes in the voltagelevel output from the detection circuit.
 11. A method of detecting awire connection with a personal computer using a detector, the detectorincluding, a plug for connecting the detector to the personal computerthrough a cable; a battery power supply which outputs a predeterminedconstant electrical potential; and a Micro Control Unit which receives aspecific electrical potential from the personal computer through theplug and cable, and receives the constant electrical potential from thebattery power supply, the Micro Control Unit including, a CPU andperipheral circuit which receives the specific electrical potential fromthe personal computer and the constant electrical potential from thebattery power supply; a USB function circuit which receives the specificelectrical potential from the personal computer, wherein the USBfunction circuit is on-off controlled by the CPU and peripheral circuit;and an A-D converter which receives the specific electrical potentialfrom the personal computer and the constant electrical potential fromthe battery power supply, receives a differential signal, and outputs anelectrical potential to the CPU and peripheral circuit based thereceived electrical potentials and the differential signal, the methodcomprising the step of detecting, by the A-D converter, connection withthe personal computer based on the difference in the voltage levelbetween differential signals when the personal computer is connected andwhen the personal computer is not connected.
 12. A method of detecting awire connection with a personal computer using a detector, the detectorincluding, a plug for connecting the detector to the personal computerthrough a cable; a battery power supply which outputs a predeterminedconstant electrical potential; and a Micro Control Unit which receives aspecific electrical potential from the personal computer through theplug and cable, and receives the constant electrical potential from thebattery power supply, the Micro Control Unit including, a CPU andperipheral circuit which receives the specific electrical potential fromthe personal computer and the constant electrical potential from thebattery power supply; a USB function circuit which receives the specificelectrical potential from the personal computer, wherein the USBfunction circuit is on-off controlled by the CPU and peripheral circuit;and a ring oscillator which receives the specific electrical potentialfrom the personal computer and the constant electrical potential fromthe battery power supply, and outputs an electrical potential to the CPUand peripheral circuit based the received electrical potentials, themethod comprising the step of detecting, by the CPU and peripheralcircuit, connection with the personal computer based on the differencein the oscillation output of the ring oscillator between when thepersonal computer is connected and when the personal computer is notconnected.
 13. A method of detecting a wire connection with a personalcomputer using a detector, the detector including, a plug for connectingthe detector to the personal computer through a cable; a battery powersupply which outputs a predetermined constant electrical potential; anda Micro Control Unit which receives a specific electrical potential fromthe personal computer through the plug and cable, and receives theconstant electrical potential from the battery power supply, the MicroControl Unit including, a CPU and peripheral circuit which receives thespecific electrical potential from the personal computer and theconstant electrical potential from the battery power supply; a USBfunction circuit which receives the specific electrical potential fromthe personal computer, wherein the USB function circuit is on-offcontrolled by the CPU and peripheral circuit; and a comparator whichreceives the specific electrical potential from the personal computerand the constant electrical potential from the battery power supply,receives a differential signal, and outputs an electrical potential tothe CPU and peripheral circuit based the received electrical potentialsand the differential signal, the method comprising the step ofdetecting, by the comparator, connection with the personal computerbased on a difference in the voltage level between differential signalswhen the personal computer is connected to the detector and when thepersonal computer is not connected to the detector.
 14. A method ofdetecting a wire connection with a personal computer using a detector,the detector including, a plug for connecting the detector to thepersonal computer through a cable; a battery power supply which outputsa predetermined constant electrical potential; and a Micro Control Unitwhich receives a specific electrical potential from the personalcomputer through the plug and cable, and receives the constantelectrical potential from the battery power supply, the Micro ControlUnit including, a CPU and peripheral circuit which receives the specificelectrical potential from the personal computer and the constantelectrical potential from the battery power supply; a USB functioncircuit which receives the specific electrical potential from thepersonal computer, wherein the USB function circuit is on-off controlledby the CPU and peripheral circuit; and an inverter which receives thespecific electrical potential from the personal computer and theconstant electrical potential from the battery power supply, receives adifferential signal, and outputs an electrical potential to the CPU andperipheral circuit based the received electrical potentials and thedifferential signal, the method comprising the step of detecting, by theinverter, connection with the personal computer based on a difference inthe voltage level between differential signals when the personalcomputer is connected to the detector and when the personal computer isnot connected to the detector.
 15. A method of detecting a wireconnection with a personal computer using a detector, the detectorincluding, a plug for connecting the detector to the personal computerthrough a cable; a battery power supply which outputs a predeterminedconstant electrical potential; an oscillator which outputs anoscillation signal; and a Micro Control Unit which receives a specificelectrical potential from the personal computer through the plug andcable, receives the constant electrical potential from the battery powersupply, and receives the oscillation signal from the oscillator, theMicro Control Unit including, a CPU and peripheral circuit whichreceives the specific electrical potential from the personal computerand the constant electrical potential from the battery power supply; anoscillation circuit which detects a voltage level of the specificelectrical potential from the personal computer, receives theoscillation signal from the oscillator, and outputs an oscillationoutput based on the detected voltage level and the oscillation signal;and a counter which counts the oscillation output from the oscillationcircuit and outputs a detection signal to the CPU and peripheralcircuit, the method comprising the step of detecting, by the CPU andperipheral circuit, connection with the personal computer based oncounting in the counter of the oscillation output from the oscillationcircuit when the personal computer is connected to the detector.